<%@ page contentType="text/html;charset=UTF-8" isErrorPage="true" %>
<%@ page import="org.slf4j.Logger,org.slf4j.LoggerFactory"%>
<%@ page isErrorPage="true"%>
<%response.setStatus(200);%>
<%
    Throwable ex = null;
    if (exception != null)
        ex = exception;
    if (request.getAttribute("javax.servlet.error.exception") != null)
        ex = (Throwable) request.getAttribute("javax.servlet.error.exception");
    //记录日志
    if (ex!=null){
        Logger logger = LoggerFactory.getLogger("500.jsp");
        logger.error(ex.getMessage(), ex);
    }
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>500 - 系统内部错误</title>
</head>
<body>
    <div class="container-fluid">
        <input name="message" value="${requestScope.message}" hidden="hidden">
        <div class="page-header"><h1>系统发生内部错误.</h1></div>
        <div><a href="javascript:" onclick="toMenu()" class="btn">返回目录页</a></div>
        <script>
        function toMenu(){
            top.window.location=ctx;
        }
        $(function(){
            var message = "${requestScope.message}";
            MsgBox.error(message);
        });
        </script>
    </div>
</body>
</html>